home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / bbs / F123_DEV.lha / FAME_C.lha / FAMEDoor_C_0.22 / TestDoor.c < prev    next >
C/C++ Source or Header  |  1996-02-03  |  960b  |  68 lines

  1.  
  2. /* FAME Door Beginning Source
  3.  *
  4.  * $VER:TestDoor.c v0.22
  5.  *
  6.  * All you need are the includes and headers!
  7.  *
  8.  * Used tab size: 2
  9.  */
  10.  
  11. /* Includes:
  12.  */
  13.  
  14. #include <FAME/FAMEPublic.h>
  15.  
  16. /* Global variables:
  17.  */
  18.  
  19. #ifdef LATTICE
  20. int CXBRK(void) {return(0);} /* Disable Lattice CTRL-C handling */
  21. int chkabort(void) {return(0);}
  22. #endif
  23.  
  24. /* Prototypes:
  25.  */
  26.  
  27. void ShutDown(int code);
  28.  
  29. /* main() entry point:
  30.  */
  31.  
  32. void main(int argc, char *argv[])
  33. {
  34.     char str[256];
  35.  
  36.   if(argc < 2) {
  37.  
  38.     printf("\nSorry, %s is a Door and must be called from FAME BBS!\n\n",argv[0]);
  39.     exit(RETURN_ERROR);
  40.   }
  41.   SPrintf((STRPTR)FAMEDoorPort,"FAMEDoorPort%ld",FAMEAtol(argv[1]));
  42.   if(PortStart())
  43.         PortEnd(40);
  44.  
  45. /* Place your own code in here:
  46.  */
  47.  
  48.     str[0] = '\0';
  49.  
  50.     PutString("\r\nTell me something>: ",0);
  51.     GetString(str,50);
  52.     PutStringFormat("\r\nYou said: %s\r\n\n",str);
  53.  
  54. /* Ending Door!
  55.  */
  56.  
  57.     ShutDown(0);
  58. }
  59.  
  60. /* Shutdown:
  61.  */
  62.  
  63. void ShutDown(int error)
  64. {
  65.   PortEnd(error);
  66. }
  67.  
  68.